﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Eacademy.Domain.Models;
using Eacademy.Domain.ViewModels;

namespace Eacademy.Domain.Abstractions
{
    public interface IQuizRepository
    {
        List<SubjectGradeViewModel> GetGradeBookByUserId(int userId);
        Boolean UpdateQuizStudentDone(int quizStudentId);
        List<QuizViewModel> GetStudentQuizzesBySubjectId(int subjectId, int mentorUserId, int pageIndex, int pageSize, out int totalCount, bool count = true);
        Boolean UpdateQuizStudentScore(int quizStudentId, int score);
        QuestionsAnswer GetQuestionAnswer(int questionId,int quizStudentId);
        QuestionsAnswer AddQuestionAsnwer(QuestionsAnswer questionsAnswer);
        QuizStudent GetQuizStudent(int quizId);
        QuizStudent AddQuizStudent(QuizStudent quizStudent);

        QuestionViewModel GetQuestionByQuestionId(int id);

        QuizViewModel GetQuizByQuizId(int id);
        Boolean UpdateQuestion(QuestionViewModel questionViewModel);
        Boolean UpdateQuiz(QuizViewModel quizViewModel);
        Boolean AddQuestion(QuestionViewModel questionViewModel);
        Boolean AddQuiz(QuizViewModel quizViewModel, int subjectId, int mentorUserId);
        bool DeleteQuiz(int id,int mentorId);
        bool DeleteQuestion(int id);
        List<QuestionViewModel> GetQuestionsByQuizId(int quizId);
        List<QuestionViewModel> GetQuestionsByQuizId(int quizId, int pageIndex, int pageSize, out int totalCount, bool count = true);
        List<QuizViewModel> GetQuizzesBySubjectId(int subjectId, int mentorUserId, int pageIndex, int pageSize, out int totalCount, bool count = true);

         
    }
}